<template>
  <UiCard>
    <UiCardHeader class="flex justify-between items-center">
      <span>{{ item.testpaper.title }}</span>
      <span :class="item.answer_status ? 'text-green-600' : 'text-rose-600'">{{
        item.answer_status ? "考试完成" : "开始中"
      }}</span>
    </UiCardHeader>

    <UiCardBody>
      <small class="mr-3">考试总数：{{ item.testpaper.question_count }}</small>
      <small class="mr-3">总分数：{{ item.testpaper.total_score }}</small>
      <small class="mr-3">及格分：{{ item.testpaper.pass_score }}</small>
    </UiCardBody>

    <UiCardFooter class="flex justify-between items-center">
      <span>{{ item.created_time }}</span>
      <span
        >最终得分：
        <span :class="item.read_status ? 'text-green-600' : 'text-rose-600'">{{
          item.read_status ? item.score : "正在阅卷"
        }}</span>
      </span>
    </UiCardFooter>
  </UiCard>
</template>

<script setup>
// 引用声明
const props = defineProps({
  item: {
    type: Object,
    required: true,
  },
});
</script>
